// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_RETURN_ORDER
// * CreateDate    : 2011/10/25 11:27:58
// * Creater       : CodeSmith
// * LastChangeDate: 2011/10/25 11:27:58
// * LastChanger   : 2011/10/25 11:27:58
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class PurReturnOrderEntity : EntityBase
    {
        public PurReturnOrderTable TableSchema
        {
            get
            {
                return PurReturnOrderTable.Current;
            }
		}
		
		public PurReturnOrderEntity()
        {

        }
		
		public PurReturnOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ReturnOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.ReturnOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_CODE"]));
			this.ReturnPerson = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_PERSON"]));
			this.ReturnDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["RETURN_DATE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public PurReturnOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ReturnOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.ReturnOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_CODE"]));
			this.ReturnPerson = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_PERSON"]));
			this.ReturnDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["RETURN_DATE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return PurReturnOrderTable.Current;
            }
        }
		
		#region Perporty List
        public string ReturnOrderId
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_RETURN_ORDER_ID)); }
            set { SetData(PurReturnOrderTable.C_RETURN_ORDER_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_SUPPLIER_ID)); }
            set { SetData(PurReturnOrderTable.C_SUPPLIER_ID, value); }
        }
		
        public string ReturnOrderCode
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_RETURN_ORDER_CODE)); }
            set { SetData(PurReturnOrderTable.C_RETURN_ORDER_CODE, value); }
        }
		
        public string ReturnPerson
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_RETURN_PERSON)); }
            set { SetData(PurReturnOrderTable.C_RETURN_PERSON, value); }
        }
		
        public DateTime ReturnDate
        {
            get { return Convert.ToDateTime(GetData(PurReturnOrderTable.C_RETURN_DATE)); }
            set { SetData(PurReturnOrderTable.C_RETURN_DATE, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(PurReturnOrderTable.C_CREATED_DATE)); }
            set { SetData(PurReturnOrderTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_CREATED_BY)); }
            set { SetData(PurReturnOrderTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(PurReturnOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(PurReturnOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(PurReturnOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(PurReturnOrderTable.C_APPROVED_DATE)); }
            set { SetData(PurReturnOrderTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_APPROVED_BY)); }
            set { SetData(PurReturnOrderTable.C_APPROVED_BY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(PurReturnOrderTable.C_STATUS)); }
            set { SetData(PurReturnOrderTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

